package com.jingli.pile.util;

import java.security.PrivateKey;
import java.security.PublicKey;
public class HMacMd5Key implements PublicKey, PrivateKey{
    private final HMacMd5KeySpec spec;

    public HMacMd5Key(HMacMd5KeySpec spec){
        this.spec = spec;
    }

    @Override
    public String getAlgorithm() {
        return "HMacMd5";
    }

    @Override
    public String getFormat() {
        return "NOPadding";
    }

    @Override
    public byte[] getEncoded() {
        return spec.toBytes();
    }
}
